package fm;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.*;

/**
 * Created by Administrator on 2017/8/28.
 */
public class TestHttpServer {

    /**
     *
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception
    {
        Server server = new Server(8081);

        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setResourceBase("d:/");
        resourceHandler.setDirectoriesListed(true);
        server.setHandler(resourceHandler);
        server.start();
        System.out.println("123");
    }
}